A method of using active contour models, as is disclosed, for example, in M. Kass, A. Witkin, and D. Terzopoulos, “Snakes: Active Contour Models”, International Journal of Computer Vision, Vol. 1, No. 4, pp. 321-331, 1988, has been known as a method of detecting a contour of an object. The active contour models are used to detect a contour by setting energy to contour models and then minimizing the energy. The active contour models have an advantage that a contour can be detected even when the contour edge of an object is disconnected; however, they have problems that a processing time for convergence computation is too long and the computation fails when initial parameters are too different.
Recently, there has been proposed a contour detecting method using affine transformation, as is disclosed in H.H.S. Ip, D. Shen, “An affine-invariant active contour model (AI-snake) for model-based segmentation”, Image and Vision Computing, Vol. 16, pp. 125-146, 1998. This contour detecting method, however, merely allows variation with respect to models, and it is not a method of actively obtaining transform parameters.
Further, there has been disclosed a method of detecting feature points, such as the eye, from an image of the face of an individual (for example, see Japanese Patent No. 3279913, and Kazuhiro Fukui and Osamu Yamaguchi, “Keijyou tyuushutsu to patanshougou no kumiawaseniyoru kaotokutyouten tyuushutsu”, Shingakuron (D-II), vol. J80-D-II, no. 9, pp. 2170-2177, August 1997). However, variation of the facial pose is not particularly concerned in this contour detecting method, and this method has a problem that a huge volume of training data is necessary for pattern matching.
Incidentally, digital makeup has been recently proposed, by which a face image is inputted and makeup is put on the face image digitally (Yuasa, et al, “Hitomi-rinkaku no kouseido tyuushutsu to dejitarumeikuheno ouyou”, PRMU 2002-62, pp. 37-42, Jul., 2002).
Digital makeup is to put eye shadow around the eyes or put lipstick on the lips of the face image digitally. When such digital makeup is put on, makeup can be put on within an intended region, such as the vicinity of the eyes, if the face image was taken from the front. When the face is not facing the front and its orientation is rotated with respect to the front, makeup cannot be put well on the input face image, which raises a problem that the makeup is out of the intended region.
This problem is attributed to the inability to detect contours of the eyes, the lips, etc. exactly due to the tilt of the face. In other words, initial parameters needed to detect contours are not changed to initial parameters corresponding to variance of the facial pose. It is difficult for the contour detecting method in the related art to detect contours quickly and exactly using the initial parameters changed by taking variance of the facial pose into account.
In order to solve these problems, the invention provides an image processing apparatus capable of detecting feature points or contours with ease by transforming initial parameters used when detecting feature points or contours depending on the posture of an object, such as the face.